/* 全局样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

header {
    background-color: #333;
    color: white;
    padding: 10px 0;
    text-align: center;
}

nav ul {
    list-style-type: none;
    padding: 0;
}

nav ul li {
    display: inline;
    margin-right: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
}

nav ul li a.active {
    font-weight: bold;
}

main {
    padding: 20px;
}

section {
    margin-bottom: 30px;
}

h2 {
    color: #333;
}

/* 首页幻灯片 */
.slideshow-container {
    max-width: 1000px;
    position: relative;
    margin: auto;
}

.mySlides {
    display: none;
}

.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {
        opacity: .4
    }
    to {
        opacity: 1
    }
}

.dots-container {
    text-align: center;
    margin-top: 20px;
}

.dot {
    height: 15px;
    width: 15px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
}

.active-dot {
    background-color: #717171;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
}

/* 车辆展示 */
.car-display {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.car {
    width: 30%;
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
}

.car img {
    width: 80%;
    height: auto;
    margin-bottom: 10px;
}

/* 表单样式 */
form {
    max-width: 400px;
    margin: auto;
}

label {
    display: block;
    margin-bottom: 5px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
}

button {
    width: 100%;
    background-color: #333;
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
}

button:hover {
    background-color: #555;
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
}

/* 导航栏样式 */
nav {
    background-color: #333;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

nav ul li {
    float: left;
}

nav ul li a {
    display: block;
    color: white;
    text-align: center;
    padding: 14px 20px;
    text-decoration: none;
    transition: 0.3s, color 0.3s;
}

nav ul li a:hover, nav ul li a.active {
    background-color: #575757;
    color: #fff;
    border-bottom: 3px solid #ffab00;
}

/* 小屏幕适配 */
@media screen and (max-width: 600px) {
    nav ul {
        flex-direction: column;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        text-align: left;
        padding: 14px;
    }
}

/* 车辆卡片样式 */
.car {
    width: 320px; /* 调整卡片宽度 */
    margin: 10px; /* 增加一些外边距以分隔卡片 */
    border: 1px solid #ddd; /* 增加边框以突出卡片 */
    border-radius: 5px; /* 添加圆角 */
    overflow: hidden; /* 确保内容不溢出 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 添加阴影以提升视觉效果 */
    /* display: none; 初始隐藏所有车辆 */
}

.car img {
    width: 100%; /* 确保图片适应卡片宽度 */
    height: auto; /* 保持图片比例 */
}

.car h4, .car p {
    text-align: center; /* 居中文本 */
    margin: 10px 0; /* 增加内部边距 */
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.pagination button {
    padding: 2px 8px; /* 缩小按钮的内边距 */
    margin: 0 5px; /* 缩小按钮之间的间距 */
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 3px; /* 调整圆角 */
    cursor: pointer;
    font-size: 12px; /* 调整字体大小 */
    width: 60px; /* 固定按钮宽度 */
    text-align: center; /* 文本居中 */
}

.pagination button:hover {
    background-color: #0056b3;
}

.pagination span {
    font-size: 14px; /* 调整字体大小 */
    margin: 0 10px; /* 调整文字两侧的间距 */
}

/* 评论区样式 */
#comments {
    margin-top: 30px;
}

#comments .comment-list {
    margin-bottom: 20px;
}

.comment {
    background-color: #f9f9f9;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    transition: box-shadow 0.3s ease;
}

.comment:hover {
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 12px;
}

.comment-body {
    padding-left: 10px;
    font-size: 14px;
}

#comment-form {
    margin-top: 20px;
}

#comment-form label {
    display: block;
    margin-bottom: 5px;
}

#comment-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

#comment-form textarea:focus {
    border-color: #333;
    outline: none;
}

#comment-form button {
    width: 100%;
    background-color: #007bff;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

#comment-form button:hover {
    background-color: #0056b3;
}

/* styles.css */

/* 全局样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* 让内容垂直居中 */
}

main {
    width: 80%; /* 设置主要内容宽度 */
}

section {
    margin-bottom: 30px;
}

h2 {
    text-align: center; /* 标题居中 */
}

/* 评论区样式 */
#comments {
    margin-top: 30px;
    text-align: center; /* 将评论区内容居中 */
}

#car-details {
    display: flex;
}

.car-detail {
    flex: 1; /* 将车辆详情部分占据剩余空间 */
    margin-right: 20px; /* 为了增加图片和表单之间的间距 */
}

#rental-form {
    flex: 0 0 auto; /* 设置表单不随内容而拉伸 */
    margin-top: auto; /* 将表单顶部与底部对齐 */
}

#rental-form label {
    display: block;
    margin-bottom: 5px;
}

#rental-form input[type="number"],
#rental-form button {
    width: 100%;
}

#car-details {
    display: flex;
}

.car-detail {
    flex: 1;
    margin-right: 20px;
}

#rental-form {
    margin-top: auto;
}

#rental-form button[type="submit"],
#rental-form button[type="button"] {
    width: 100%;
}

#rental-form button[type="button"] {
    margin-top: 10px;
}

#rental-form {
    width: 220px;
}

#rental-form #rental-days {
    display: block;
    width: 230px;
    height: 40px;
    padding: 2px;
    font-size: 20px;
    /* border: #0056b3 10px solid; */
}

#rental-form #money {
    display: block;
    width: 230px;
    height: 40px;
    padding: 2px;
    font-size: 20px;
    /* border: #0056b3 10px solid; */
}

#rental-form button {
    margin-top: 10px;
    width: 235px;
    border-radius: 5px;
}